package com.yiwei.controller;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class AssistantConfig {
	public static Properties properties = new Properties();
 
	static {
		try {
			//打包放开
            BufferedReader bufferedReader = new BufferedReader(new FileReader("config.properties"));
            
            //测试专用
//			InputStream bufferedReader = AssistantConfig.class.getClassLoader().getResourceAsStream("config.properties");

			properties.load(bufferedReader);
			System.out.println("配置文件加载成功");
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(0);
		}

	}
}
